package cn.yj.cgs.dba.mapper;

import cn.yj.annotation.pagehelper.annotation.StartPage;
import cn.yj.annotation.pagehelper.page.Page;
import cn.yj.cgs.dba.entity.IntegralWater;
import cn.yj.cgs.dba.entity.vo.IntegralWaterPcVo;
import cn.yj.cgs.dba.entity.vo.InterWaterRollVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;


/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 永健
 * @since 2021-04-19 16:12:11
 */
public interface IntegralWaterMapper extends BaseMapper<IntegralWater>{
    @StartPage
    List<IntegralWater> findList(@Param("map") Map<String, Object> map, @Param("page") Page<Object> page);

    List<Date> listCreateTimeAsc(Map<String, Object> map);

    int exitsBySource(@Param("userCode") String userCode,@Param("source") String source);

    int exitsByInviteCode(@Param("userCode") String userCode,@Param("inviteCode") String inviteCode,@Param("source") String source);

    int exitsByMap(Map<String, Object> map);

    @StartPage
    List<InterWaterRollVo> selectRecordsBySource(@Param("list") List<String> sources,@Param("page") Page<InterWaterRollVo> page);

    BigDecimal selectOutCountListByStatus(@Param("userCode")String userCode,@Param("status") String status);

    // pc
    @StartPage
    List<IntegralWaterPcVo> pageList(@Param("map") Map<String, Object> map, Page<IntegralWaterPcVo> page);

    // pc
    IntegralWater selectByNoForUpdate(String waterNo);
}
